//
//  UIImageView+HACShield.m
//  HACRouter
//
//  Created by Chengjie on 2019/5/22.
//

#import "UIImageView+HACShield.h"
#import "NSObject+HACSwizzling.h"

@implementation UIImageView (HACShield)

+ (void)load {
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        hac_swizzleInstanceMethod(hac_getClass(@"UII", @"mageView"), @selector(initWithImage:), @selector(hac_initWithImage:));
    });
}

- (instancetype)hac_initWithImage:(UIImage *)image {
    if (image && [image isKindOfClass:UIImage.class]) {
        return [self hac_initWithImage:image];
    }
    return [self init];
}

@end
